/*
 Navicat Premium Data Transfer

 Source Server         : 检查系统（开发环境）
 Source Server Type    : SQL Server
 Source Server Version : 12002000
 Source Host           : 47.102.106.48:1433
 Source Catalog        : dev-check
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 12002000
 File Encoding         : 65001

 Date: 11/08/2020 10:05:49
*/


-- ----------------------------
-- Table structure for project_build_basement
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[project_build_basement]') AND type IN ('U'))
	DROP TABLE [dbo].[project_build_basement]
GO

CREATE TABLE [dbo].[project_build_basement] (
  [basement_id] int IDENTITY(100001,1) NOT NULL,
  [project_id] int NOT NULL,
  [build] nvarchar(100) COLLATE Chinese_PRC_CI_AS NOT NULL,
  [floor_num] int DEFAULT ((0)) NULL,
  [family_num] int NULL,
  [standard_floor_num] int DEFAULT ((0)) NULL,
  [pile_num] int DEFAULT ((0)) NULL,
  [beton_construction_floor_num] varchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
  [remark1] varchar(255) COLLATE Chinese_PRC_CI_AS NULL,
  [created_time] datetime DEFAULT (getdate()) NOT NULL,
  [last_modified_time] datetime DEFAULT (getdate()) NOT NULL
)
GO

ALTER TABLE [dbo].[project_build_basement] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'id',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'basement_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目id',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'project_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'名称（楼栋号）',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'build'
GO

EXEC sp_addextendedproperty
'MS_Description', N'层数',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'floor_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'户数',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'family_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'标准层',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'standard_floor_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'桩基个数',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'pile_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'混凝土-施工层数（施工进度）',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'beton_construction_floor_num'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'created_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'最后更新时间',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement',
'COLUMN', N'last_modified_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目楼栋(项目进度——地下项目)',
'SCHEMA', N'dbo',
'TABLE', N'project_build_basement'
GO


-- ----------------------------
-- Primary Key structure for table project_build_basement
-- ----------------------------
ALTER TABLE [dbo].[project_build_basement] ADD CONSTRAINT [PK__project___3213E83F7E01FA59_copy1] PRIMARY KEY CLUSTERED ([basement_id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

